<?xml version="1.0" encoding="UTF-8"?>
<ui:composition template="/pages/mastertemplate/MasterPage.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
	<ui:define name="content">
		<p:panel header="#{msg.loaivthh_title}">
		
			<h:form>
				<p:commandButton style="width:150px;float: left;margin-top:10px;"
					value="#{msg.Button_export}"
					actionListener="#{BaoGiaBean.downloadFileCSV}" ajax="false">
					<p:fileDownload value="#{BaoGiaBean.file}" />
				</p:commandButton>
			</h:form>

			<h:form id="loaiVTHHForm">
				<p:growl id="growforFile" autoupdate="true"
					life="#{DataConfigBean.growlShow}" />
					
				<p:dataTable var="loaivthh" id="dataTable"
					value="#{LoaiVTHHBean.loaivthhRoot}"
					style="width: 100%; margin: 45px auto;">

					<f:facet name="header">
						<h:outputText value="#{msg.danhsachloaivthh}"
							styleClass="tableHeader" />

					</f:facet>

					<p:column headerText="#{msg.maloaivthh}">#{loaivthh.maLoai}  </p:column>

					<p:column headerText="#{msg.tenloaivthh}">  #{loaivthh.tenLoai}   </p:column>

				</p:dataTable>

			</h:form>
			
		</p:panel>
	
		<p:panel header="#{msg.vthh_title}">
		
			<h:form id="vthhForm">
				<!--p:growl id="growforFile" autoupdate="true"
					life="#{DataConfigBean.growlShow}" /-->
				
				<p:dataTable id="dataTableVatTuHangHoa" var="vthh"
					value="#{VatTuHangHoaBean.vthhModel}" lazy="true" paginator="true"
					rows="10"
					paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
					rowsPerPageTemplate="10,20,50,100"
					style="width: 100%; margin: 45px auto;">

					<f:facet name="header">
						<h:outputText value="#{msg.danhsachvthh}" styleClass="tableHeader" />
					</f:facet>

					<p:column headerText="#{msg.mavthh}">#{vthh.maVTHH}  </p:column>

					<p:column headerText="#{msg.tenvthh}">  #{vthh.tenVTHH}   </p:column>
					
					<p:column headerText="#{msg.giaBan}">  #{vthh.loaiVTHH.donGiaBan}   </p:column>
					
					<p:column headerText="#{msg.loaivthh}">  #{vthh.loaiVTHH.dienGiaiBan}   </p:column>

	
				</p:dataTable>
			</h:form>
		
		</p:panel>

	</ui:define>
</ui:composition>
